#pragma once
#include "handler.h"
#include <boost\regex.hpp>

namespace fly {

	namespace jld{

		namespace server {

			class user_handler :
				public handler
			{
			private:
				regex account_exp_;
			protected:
				user_handler* user_hnd_;
				user_handler* set_next_user(user_handler* );
				bool check_account(const User& user);
				virtual bool handle_user(User& user, recv_buf& recv_buf, send_buf& send_buf, conn_info& conn_info);
			public:
				user_handler();
				virtual ~user_handler();
				handler* init_branch();
				virtual bool handle_recv(recv_buf& recv_buf, send_buf& send_buf, conn_info& conn_info);
			};
		}
	}
}

